home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / tmg105b2.zip / SCRIPTS.DOC < prev    next >
Text File  |  1996-08-03  |  62KB  |  1,399 lines

  1.   SCRIPTS.DOC                                                        Page  1
  2.   ╒═════════════════════════════════════════════════════════════════════════╕
  3.   │             The Magic Gate version 1.05                                 │
  4.   │             Documentation  August '96                                   │
  5.   │             (C) Copyright 1995, 1996  All Rights Reserved               │
  6.   │               Joseph O'Connor                                           │
  7.   ╘═════════════════════════════════════════════════════════════════════════╛
  8.  
  9.         This game may be distributed in its original, unmodified form as
  10.   long as no money is made off of it.  Please do not include the contents
  11.   of this archive in any CD, collection, or whatever without express written
  12.   permission of ME!
  13.  
  14.   This file was written for all you gamers out there who want to have a 
  15.   custom game going on on your system.  Contained within are the secrets of
  16.   the universe.... No wait, that was the other document, this one has all the
  17.   information you will need to write areas for Magic Gate.  What you will find
  18.   will shock, will stun, will even AMAZE you, so true believers, sit back and
  19.   enjoy the ride.
  20.  
  21.   ─═════════════════════════════════════════════════════════════════════════─
  22.   Introduction:
  23.  
  24.   
  25.   As you may, or may not know, The Magic Gate supports EXternal MODuleS which
  26.   can be written by anyone in any language whatsoever and you get to mess with
  27.   drop files and writing your own routines for things I've already done.
  28.   Don't get me wrong, that is the best route to go if you want to do something
  29.   totally slick and new.  But if you don't need all the bells, whistles and
  30.   power of say, Turbo Pascal, C++ etc, you can still add something 100% unique
  31.   to your game.  The answer lies within the power of ASCII scripts which can
  32.   be written with any word processor or text editor.  This is new as of
  33.   version 1.02, but I have written several test scripts to test it as thorough
  34.   as possible.  First I will go through the pre-defined variables and what
  35.   they reference, then a list of predefined commands, using examples if I
  36.   feel like it ;) etc... hopefully by the end you will understand enough of
  37.   the language to write a script.  (I need to have more programmer friends,
  38.   all of the friends I had look at this had their head explode... <G>)
  39.  
  40.   SCRIPTS.DOC                                                        Page  2
  41.   ─═════════════════════════════════════════════════════════════════════════─
  42.   All about Variables:
  43.  
  44.   Variables are EVERYWHERE.  (Don't make me give examples..)  TMG Scripting
  45.   Language (TMGSL?? whatever) has a bunch of variables, and a bunch of funny
  46.   looking strings that represent variables.  There are 20 variables each,
  47.   of 80 bytes (characters) in length which can be used to store both numerical
  48.   and textual data (Don't ask me how it works, it just does).  As well as
  49.   29 variables which are either 1 (On) or 0 (Off) or 2 (Maybe) (nevermind)...
  50.   These variables, and their contents can be accessed via escape codes in
  51.   the ASCII script file.  It's example time kiddies!  Okay, say you wanted
  52.   to print how much gold the character currently had on him/her.  You would
  53.   write a line in the script file that looked just like this:
  54.  
  55.     Writeln "Gold on Hand : ^CS18"
  56.  
  57.   Say the character had 386 gold on had, the line would look like this:
  58.  
  59.     Gold on Hand : 386
  60.  
  61.   Amazing, isn't it?  Don't worry about each command just yet, the variables
  62.   are what is going to make the program go...  You can check the contents of
  63.   variables conditionally as well.  You could check to see if the player had
  64.   any creature fights and then perform a certain action easily by doing
  65.   something like this:
  66.  
  67.     If ^CS26 > 0
  68.       Writeln "You Have ^CS26 creature fights left today."
  69.     Endif
  70.  
  71.   If the player doesn't have any forest fights left, then the Writeln statement
  72.   will not be executed, and neither would enything before the Endif.
  73.   
  74.   Hopefully the fog is starting to lift from your brain and things have
  75.   become much clearer.  No?  Well, this is only Page 2
  76.   
  77.   SCRIPTS.DOC                                                        Page  3
  78.   ─═════════════════════════════════════════════════════════════════════════─
  79.   Variables of Gender :
  80.   
  81.  
  82.   ^CA   Character Name
  83.   ^CB   male/female, based on sex of character
  84.   ^CC   son/daughter, based on sex of character
  85.   ^CD   his/her, based on sex of character
  86.   ^CE   he/she, based on sex of character
  87.   ^CF   him/her, based on sex of character
  88.   ^CG   sir/ma'am, based on sex of character
  89.   
  90.   ^DA   Name of Character's master
  91.   ^DB   male/female, based on sex of characters master
  92.   ^DC   son/daughter, based on sex of characters master
  93.   ^DD   his/her, based on sex of characters master
  94.   ^DE   he/she, based on sex of characters master
  95.   ^DF   him/her, based on sex of characters master
  96.   ^DG   sir/ma'am, based on sex of characters master
  97.   
  98.   Using just these variables, you can make menus look gramatically correct
  99.   for EVERY character.  Say you wanted to have a few lines of text, whether
  100.   its in a menu, or in Write/Writeln statements, that gives the person the
  101.   idea that they are going up to their master and kneeling at his/her feet.
  102.   Do something Just like this:
  103.  
  104.     Writeln "  You go up to ^DA and kneel at ^DD feet."
  105.     Writeln "  ^DA acknowledges you and says :"
  106.     Writeln "  'What can I do for you my ^CC?'"
  107.  
  108.   Lets use Martissa as your master, mastissa is female.  You are Bob, you are
  109.   male.  These 3 lines would look like this:
  110.  
  111.      You go up to Martissa and kneel at her feet.
  112.      Martissa acknowledges you and says :
  113.      'What can I do for you my son?'
  114.  
  115.   The pronouns will change based on gender and all that good gramatically
  116.   correct stuff.
  117.   That's some pretty nifty stuff, but it doesn't just stop there... I am
  118.   sure you will need to do a few more things with characters information 
  119.   aside from what their gender is.
  120.   
  121.   SCRIPTS.DOC                                                        Page  4
  122.   ─═════════════════════════════════════════════════════════════════════════─
  123.   About Character Related Variables:
  124.   
  125.   All of the following commands will give you some sort of information
  126.   about the character.  This all can be used just as has been described
  127.   before.  These can also be modified using the commands in the script.
  128.   (Like ADD and SET).  Obviously, string variables cannot be added to, but
  129.   can still be SET, (using SETSTR).  I don't allow scripts to change :
  130.   A.)Characters Real Name, or B.)Characters Level in any way shape or form.
  131.   Some of these variables I don't allow a SET command to be used on simply
  132.   because I'd rather you just Added to and subtracted from.  There are only
  133.   three (Attack,Defense, and Damage Reduction) so when you go to 
  134.   
  135.   Set ^CS03 4500 
  136.   
  137.   and it doesn't do anything, you'll know why.  The following is legal, though
  138.   
  139.   Add ^CS03 4500 
  140.   
  141.   It will add 4500 to attack, so I'm relying on you script writers not to 
  142.   make the game too easy.
  143.   
  144.   
  145.   Some of the variables work differently whether you are modifying it or just
  146.   displaying it.  The variable for guild is a good example.
  147.   
  148.   ^CS09 Will give you the name of the guild when used in a Write/Writeln
  149.         but the guild number is used everywhere else ^CS09 is found.  
  150.  
  151.         Refer to the next page for details on all the variables.
  152.  
  153.   SCRIPTS.DOC                                                        Page  5
  154.   ─═════════════════════════════════════════════════════════════════════════─
  155.   ^CS Variables : Their Numbers and their Meanings
  156.   
  157.  
  158.   ^CS01   Name (same as ^CA)
  159.   ^CS02   *Real Name*
  160.             You cannot modify this variable at all.
  161.             Can only use in a Write type command or comparison.
  162.   ^CS03   Attack Value
  163.             You cannot use the Set command on this variable
  164.   ^CS04   Defense Value
  165.             You cannot use the Set command on this variable
  166.   ^CS05   Damage Reduction Value
  167.             You cannot use the Set command on this